
import Vue from 'vue'   //引入vue.js库
import App from './App'  //引入App.vue组件
import router from './router'  //默认引入

import Js from './yg/计算属性.vue'
import Yg from './yg/staff.vue'
import Tm from './yg/class-style.vue'
import Qr from './yg/导航切换.vue'
import Td from './yg/toDoList.vue'
import Xs from './yg/事件修饰符.vue'
import Cr from './yg/t.vue'
import Mh from './yg/模糊搜索.vue'
import Md from './yg/mod.vue'
import Wh from './yg/watch.vue'
import Sc from './yg/watch.vue'
import Ip from './yg/oninput.vue'
import Xh from './yg/小黑记事.vue'
import Ly from './yg/留言板广播.vue'
import Qh from './yg/点击切换.vue'
import St from './yg/style.vue'
import Jd from './yg/jd.vue'
import Ax from './yg/Axios.vue'
import Lb from './yg/lb.vue'
import Sw from './yg/sw.vue'
import Jt from './yg/t.vue'
import Sr from './yg/scrool.vue'
import Gj from './yg/gjhs.vue'
import Sp from './yg/jdsoop.vue'
import Sgg from './yg/sgg.vue'
import City from './elm/city.vue'
import Bd from './yg/jwbaidu.vue'
import directive from './自定义指令/directive.js'  //不能删除
import 'swiper/dist/css/swiper.min.css'
import 'swiper/dist/js/swiper.min'
import axios from "axios"
import store from "./store/index.js"
Vue.prototype.axios = axios
Vue.config.productionTip = false;
new Vue({          //创建一个vue对象
  el: '#app',     //挂在点(使用哪个 元素来作为vue的容器)
  store,      //使用VueX
  router,       //开启路由
  components: { App },   //要使用的跟组件
  template: '<App/>',  //渲染根组件
})
Vue.directive('big', function (element, binding) {
  element.innerText = binding.value * 10;
})
// Vue.directive('num', function (element, binding) {
//   var edg = /^\d{1,10}$/
//   if (edg.test(element.value)) {
//     element.value = element.value
//   }
//   else if (edg.test(element.value) == false) {
//     element.disabled = true
//   }
// })
Vue.filter('jia', function (a) {
  // return a[0].toUpperCase()+a.slice(0,4) 
// return a.toFixed(2)
return a.toFixed(2)
})
//渲染根组件
